package com.mybatispluslambda.readingaspoem;

import org.apache.commons.codec.digest.DigestUtils;

import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;

/**
 * @className: Crack
 * @description: reading as a poem
 * @author: hatricks
 * @date: 2020/11/2 8:37
 */
public class Crack {
    //黑白皆算，对我等众猿而言中央C所在位置数优剃爱肤杠吧爱慕帝贰亿次的值是?
    //找到钢琴中间位置的值为40,从0开始计算为39
    // 优剃爱肤杠吧爱慕帝贰亿 UTF-8 爱慕帝 MD2
    // 原文
    public static void main(String[] args) {
        String data = "39";
        try {
            for (int i = 1; i <= 100000000; i++) {
                data = new String(DigestUtils.md2Hex(data).getBytes("gbk"), StandardCharsets.UTF_8);
                System.out.println("已运行" + i + "次");
            }
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        System.out.println(data);
    }
}
